package org.csmz.xg2333;

public class Student {
    String stuId;
    String stuName;
    public Student(String stuId,String stuName){
        this.stuId = stuId;
        this.stuName = stuName;
    }
    public String toString(){
        return "学号"+stuId+",姓名："+stuName;
    }
    public int hashCode(){
        return stuId.hashCode();
    }
    public boolean equals(Object obj){
        if (this == obj){
            return true;
        }
        if (obj == null || !(obj instanceof Student)) {
            return false;
        }
        Student student = (Student) obj;
        return this.stuId.equals(student.stuId);
    }
}
